<template>
  <el-container class="Home_Style">
    <!-- 头部区域 -->
    <el-header>
      <span>家谱管理系统</span>
      <el-button @click='logout()' type="info">退出</el-button>
    </el-header>
    <!-- 页面主题 -->
    <el-container>
      <!-- 侧边栏 -->
      <el-aside width="200px">
        <!-- 侧边栏菜单区域 -->
        <el-menu background-color="#34495e" text-color="#1a2a3a" active-text-color="#14" :unique-opened="true"
          :router="true">
          <!-- 数据登记 -->
          <el-menu-item index="/fform">家组登记</el-menu-item>
          <el-menu-item index="/fQuery">家族查询</el-menu-item>
              <el-menu-item index="/userform">成员信息登记</el-menu-item>
               <el-menu-item index="/userquery">成员信息</el-menu-item>
              <el-menu-item index="/ConnectionForm">关系信息登记</el-menu-item>
              <el-menu-item index="/ConnectionQuery">成员关系</el-menu-item>
              <el-menu-item index="/storyForm">事件信息登记</el-menu-item>
              <el-menu-item index="/SQuery">事件查询</el-menu-item>
              <el-menu-item index="/TForm">通用表登记</el-menu-item>
              <el-menu-item index="/TQuery">通用表查询</el-menu-item>
            <el-menu-item index="/family">家谱树</el-menu-item>
        </el-menu>
      </el-aside>
      <!-- 页面主体 -->
      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
export default {
  methods: {
    logout() {
      this.$router.push('/login')
    }
  }
}
</script>

<style>
.Home_Style {
  height: 100%;
}

.el-header {
  background-color: rgba(44, 138, 245, 0.333);
  color: #032724;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 2px;
}

.el-aside {
  background-color: #34495e;
  color: #34495e;
}

.el-main {
  background-color: #f3f5f7;
}
</style>
